
#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Rectangle.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Rectangle)
{
        TEST(should be able to calculate the perimeter after reset width and height:rect(2,3),rect.setWidthAndHeight(5,6),rect.calPerimeter())
        {
                Rectangle rect(2,3);
                rect.setHeight(5);
                rect.setLength(6);
                ASSERT_EQ(22, rect.calcPerimeter());   
        } 
        TEST(should be able to calculate the area after reset width and height:rect(2,3),rect.setWidthAndHeight(5,6),rect.calArea())
        {
                Rectangle rect(2,3);
                rect.setHeight(5);
                rect.setLength(6);
                ASSERT_EQ(30, rect.calcArea());     
        } 

	TEST(perimeter should be calculated to 10 for a Rectangle:rect(2,3))
	{
		Rectangle rect(2,3);
		ASSERT_EQ(10, rect.calcPerimeter());
	}

	TEST(area should be calculated to 6 for a Rectangle:rect(2,3))
	{
		Rectangle rect(2,3);
		ASSERT_EQ(6, rect.calcArea());
	}
};
